package com.adingxiong.pm.entity.vo;

import com.adingxiong.pm.entity.WebMenu;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;


import java.io.Serializable;
import java.util.List;

/**
 * @ClassName WebMenuVO
 * @Description TODO
 * @Author xiongchao
 * @Date 2020/5/20 15:57
 **/
@Data
public class WebMenuVO implements Serializable {

    private Integer id;

    @ApiModelProperty(value = "排序")
    private Integer order;

    @ApiModelProperty(value = "目录名称")
    private String name;

    @ApiModelProperty(value = "菜单key值")
    private String key;

    @ApiModelProperty(value = "路由路径")
    private String url;

    @ApiModelProperty(value = "图标")
    private String icon;

    @ApiModelProperty(value = "打开方式 _blanl _self _top _parent")
    private String target;

    @ApiModelProperty(value = "状态 1 启用 2 禁用")
    private Integer state;

    @ApiModelProperty(value = "权限所属 0.超级管理员 1.管理员 2.普通用户")
    private Integer owners;

    @ApiModelProperty(value = "父节点id")
    @TableField(value = "parent_id")
    private String parentId;

    @ApiModelProperty(value = "子节点列表")
    private List<WebMenu> childMenus;


    /**
     * 复制内容
     * @param webMenu
     */
    public  WebMenuVO (WebMenu webMenu){
        BeanUtils.copyProperties(webMenu ,this);
    }

}
